<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <style>
      .block {
        height: 200px;
        background: red;
      }
      .inline {
        display: inline;
        background: green;
      }
      .inline-block {
        display: inline-block;
        width: 200px;
        height: 100px;
        background: blue;
      }
    </style>
  </head>
  <body>
    <div class="block" style="height: 100px">block</div>
    <div class="block" style="height: 100px; background-color: chocolate"></div>
    <p>div 设置了line-height 但是没有填充文本的话 就是 不会出现的</p>
    <div style="line-height: 100px; background-color: blueviolet"></div>
    <div style="line-height: 100px; background-color: blueviolet">
      我上面有个div 有line-height 但是因为没有文本 所以height 为0 哦
    </div>
    <div style="background-color: yellow">
      <div class="inline" style="line-height: 100px">inline</div>
      <div class="inline">inline</div>
      <div class="inline-block">inline-block</div>
    </div>
  </body>
</html>
